window.appModule.factory('questionListAPI',factoryFn);

function factoryFn($resource){
    var actions = {
        getRobotById: {
            url: ENV['API_URL']+'/openfaqserver/getRobotById.action',
            method: 'post'
        },
        getQuestionsByRobotId: {
            url: ENV['API_URL']+'/openfaqserver/getQuestionsByRobotId.action',
            method: 'post'
        },
        getQuestionsByParam: {
            url: ENV['API_URL']+'/openfaqserver/searchQuestions.action',
            method: 'post'
        } ,
        deleteQuestion: {
            url: ENV['API_URL']+'/openfaqserver/deleteQuestion.action',
            method: 'post'
        },
        getUserById: {
            url: ENV['API_URL']+'/openfaqserver/getUserById.action',
            method: 'post'
        },
        getMenusByUserId: {
            url: ENV['API_URL']+'/openfaqserver/getMenusByUserId.action',
            method: 'post'
        },
        logOut: {
            url: ENV['API_URL']+'/openfaqserver/logOut.action',
            method: 'post'
        }
    };
    return $resource('', {_ajaxWrapOption: {}},actions);
};